<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jsonp</title>
</head>
<body>
    
    <script src="./jsonp.js"></script>
    <script>
        jsonp({
            url: "http://localhost:3001/getData",
            params: {
                word: '前端',
            },
            callback: "fn",
        })
        .then(res => {
            console.log(res);
        })
        .catch(err => {
            console.log(err);
        });
    </script>
</body>
</html>